package chapter3;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description:  是否在三角形内
 * Date:2021/4/1
 * ***************************************************************
 */
public class exc3_27 {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		
		System.out.println("Enter a point's x- and y- coordinates:");
		double x=input.nextDouble();
		double y=input.nextDouble();
		
		//根据直线方程得到下面的结论
		if((0.5*x+y-100)<=0&&x>=0&&x<=200&&y<=100&&y>=0) {
			System.out.println("The point is in the triangle.");
		}else {
			
			System.out.println("The point is not in the triangle.");
		}
		
	}

}
